package com.example.demo.Bean;import org.springframework.beans.factory.annotation.Value;import org.springframework.stereotype.Component;/** * @Author Sunjinxu * @Date: 2022/3/17 下午5:57 * @Version 1.0 */@Componentpublic class Properties {    @Value("${test.name}")    private String name;    @Value("${test.age}")    private String age;    public String getName() {        return name;    }    public void setName(String name) {        this.name = name;    }    public String getAge() {        return age;    }    public void setAge(String age) {        this.age = age;    }    @Override    public String toString() {        return "Properties{" +                "name='" + name + '\'' +                ", age='" + age + '\'' +                '}';    }}